package com.sghy.xcxservice.entity;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.sghy.xcxservice.dto.UserInfoVo;
import lombok.Data;

/**
 *
 * @TableName bgb_clock_in
 */
@TableName(value ="bgb_clock_in",autoResultMap = true)
@Data
public class BgbClockIn implements Serializable {
    /**
     *
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 谁打卡
     */
    @TableField(value = "u_id")
    private String uId;

    /**
     * 纬度
     */
    @TableField(value = "latitude")
    private double latitude;

    /**
     * 经度
     */
    @TableField(value = "longitude")
    private double longitude;

    /**
     * 备注
     */
    @TableField(value = "description")
    private String description;

    /**
     * 打卡类型
     */
    @TableField(value = "type")
    private String type;

    /**
     * 照片
     */
    @TableField(value = "photos",typeHandler = FastjsonTypeHandler.class)
    private JSONArray photos;

    /**
     * 打卡时间
     */
    @TableField(value = "time")
    private Date time;
    
    @TableField(exist = false)
    private UserInfoVo user;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
